<extend name = "Common/baseView"/>
<block name="css">
    <link rel="stylesheet" href="__PUBLIC__/style/user.css">
    <link rel="stylesheet" href="__PUBLIC__/style/bootstrap.min.css">
    <script src="__PUBLIC__/js/bootstrap.min.js"></script>
    <style>
        a:hover{
            text-decoration: none;
        }
    </style>
</block>
<block name="body">
    <hr>
    <div class="usertable">
        <foreach name="data" item="v1" key="k1">
        <table class="table table-striped">
            <tr>
                <td>用户账户</td>
                <td></td>
                <td>{$v1.phone_account}</td>
                <td></td>
            </tr>
            <tr>
                <td>用户id</td>
                <td>{$v1.id}</td>
                <td>密码</td>
                <td>{$v1.password}</td>
            </tr>
            <tr>
                <td>用户昵称</td>
                <td>{$v1.name}</td>
                <td>性别</td>
                <td>
                    <if condition="$v1['sex'] eq 0">
                        <?php echo "男"; ?>
                        <else/>
                        <?php echo "女"; ?>
                    </if>
                </td>
            </tr>
            <tr>
                <td>生日</td>
                <td><?php echo date('Y-m-d',$v1['birthday']); ?></td>
                <td>验证状态</td>
                <td>
                    <if condition="$v1['status'] eq 1">
                        <?php echo "已验证";?>
                        <else/>
                        <?php echo "未验证";?>
                    </if>
                </td>
            </tr>
            <tr>
                <td>婚姻状况</td>
                <td>
                    <if condition="$v1['emotion'] eq 0">
                        <?php echo "未婚";?>
                        <elseif condition="$v1['emotion'] eq 1"/>
                            <?php echo "订婚";?>
                        <elseif condition="$v1['emotion'] eq 2"/>
                            <?php echo "已婚";?>
                        <else/>
                            <?php echo "其他";?>
                    </if>
                </td>
                <td>收入</td>
                <td>{$v1.income}</td>
            </tr>
            <if condition="($v1['emotion'] eq 1) OR ($v1['emotion'] eq 2)">
            <tr>
                <td>配偶姓名</td>
                <td>{$v1.partner_name}</td>
                <td>配偶电话</td>
                <td>{$v1.partner_phone}</td>
            </tr>
            </if>
            <tr>
                <td>地址：</td>
                <td>{$v1.address}</td>
                <td>邮箱</td>
                <td>{$v1.email}</td>
            </tr>
            <tr>
                <td>教育程度</td>
                <td>{$v1.education}</td>
                <td>行业</td>
                <td>{$v1.profession}</td>
            </tr>
            <tr>
                <td>订阅状态</td>
                <td>
                    <if condition="$v1['star'] eq 0">
                        <?php echo "取消订阅"; ?>
                        <else/>
                        <?php echo "订阅";?>
                    </if></td>
                <td>用户状态</td>
                <td>
                    <if condition="$v1['is_use'] eq 1">
                        <?php echo "启用";?>
                        <else/>
                        <?php echo "禁用";?>
                    </if>
                </td>
            </tr>
            <tr>
                <td>用户创建时间</td>
                <td>
                    <?php echo date('Y-m-d',$v1['create_time']) ?></td>
                <td>用户数据更新时间</td>
                <td><?php echo date('Y-m-d',$v1['update_time']) ?></td>
            </tr>
        </table>
        </foreach>
    </div>
</block>
<block name="js">
    <script>
        $('#userlist').addClass("layui-this");
        $('#user').addClass("layui-nav-itemed");
    </script>
</block>